#ifndef DIALOG_NEW_MODULE_H
#define DIALOG_NEW_MODULE_H

#include <QDialog>

#include <QAbstractButton>

#define MAX_PORT_NUMBER 10


namespace Ui {
class dialog_new_module;
}

#include "module/modulefileconfig.h"


class dialog_new_module : public QDialog
{
    Q_OBJECT

public:
    explicit dialog_new_module(QWidget *parent = nullptr);
    ~dialog_new_module();

    enum inouts{input, output, inout};

    QString get_name();
    int get_inout(inouts i);

private slots:

    void on_pushButton_cancel_clicked();

    void on_pushButton_ok_clicked();

    void on_lineEdit_input_port_textChanged(const QString &arg1);

    void on_lineEdit_output_port_textChanged(const QString &arg1);

    void on_lineEdit_inout_port_textChanged(const QString &arg1);

private:
    Ui::dialog_new_module *ui;

    const int INPUT_NUMBER = 1;
    const int OUTPUT_NUMBER = 2;
    const int INOUT_NUMBER = 4;

    int judge_port_number();

signals:
    void send_Data(Module_Data);
};

#endif // DIALOG_NEW_MODULE_H
